<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1" name="viewport">
<title>Please wait... - thingino</title>
<link href="/a/bootstrap.min.css" rel="stylesheet">
<style>
body {text-align:center}
.container {height:100vh;display:flex;align-items:center;justify-content:center}
progress{width:30rem;max-width:90%}
</style>
</head>
<body>
<div class="container">
<main>
<img src="/a/logo.svg" alt="Thingino Logo" class="img-fluid">
<h3 class="my-5">Restarting. Please wait...</h3>
<progress max="20" value="0"></progress>
</main>
</div>
<script>
const u='//'+window.location.host;
const p=document.querySelector('progress');
let s=0;
function t(){s+=1;p.value=s;(s===p.max)?g():setTimeout(t,1000);}
function g(){(async()=>{await fetch(u,{method:'HEAD',mode:'no-cors'}).then(()=>{window.location.replace(u);}).catch(()=>{s=0;setTimeout(t,1000);})})()}
setTimeout(t, 1000);
</script>
</body>
</html>
